<?php

namespace Api\Controller;

use Think\Controller;

Vendor('phpqrcode.phpqrcode');

class QrCodeController extends Controller
{

    public function qrCode()
    {
        $text = I('text', '');//生成内容
        $level = I('level', 0);//容错率，0-3
        $size = I('size', 3);//二维码大小 0-？
        $margin = I('margin', 4);//二维码边距
        exit(\QRcode::png($text, false, $level, $size, $margin));
    }
}
